from functools import  partial


int2 = partial(int, base=2)
"""
省去定义
def int2(x, base=2):
    return int(x, base)
"""
print(int2("1010"))